class Solution:
    def isPalindrome(self, x: int) -> bool:
        # 核心就是数字转化成为字符串
        if str(x)[0] == '-':
            return False
        else:
            return str(x) == str(x)[::-1]
